@extends('admin.layouts.master')

@section('content')

<div class="row aw-list">
	<div class="col-md-12">
		<section class="row form-inline aw-list-head">
			<div class="col-sm-4">
				<div class="aw-head-add">
					<a class="btn btn-gules" href="/admin/storefront/info?page_id=19&id=add"><i class="icon-plus"></i> 添加店面</a>
				</div>
			</div>
		</section>
	</div>
	<div class="col-lg-12">
		<section class="panel aw-content">
			<header class="panel-heading">店面列表</header>
			<table class="table table-striped dataTable table-hover">
				<thead>
					<tr>
						<th>ID</th>
						<th>店面名称</th>
						<th>店长姓名</th>
						<th>联系电话</th>
						<th>场地地址</th>
						<th>场地数量</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr v-for="(list, key) in lists" :data-key="key" :data-id="list.id">
						<td>@{{list.id}}</td>
						<td>@{{list.store_name}}</td>
						<td>@{{list.manager_name}}</td>
						<td>@{{list.phone}}</td>
						<td>@{{list.store_adds}}</td>
						<td>@{{list.field_count}}</td>
						<td>
							<a class="btn btn-green btn-xs" :href="'/admin/storefront/info?page_id=18&id='+list.id">
								<i class="icon-pencil"></i> 编辑
							</a>
							<button class="btn btn-gules btn-xs" v-on:click="List_Del(list.id,list.store_name)">
								<i class="icon-trash"></i> 删除
							</button>
						</td>
					</tr>
				</tbody>
			</table>
			<div class="aw-text-center aw-list-null" v-if="lists.length==0">暂无数据</div>
			<vue-page :page_item="page_item" :page_this="page_this" :page_all="page_all" :Call_back="Call_back"></vue-page>
		</section>
	</div>
</div>



@section('pagejs')
@parent

<script type="text/javascript" src="/admin/js/vue-page.js"></script>
<script type="text/javascript" src="/admin/js/page.js"></script>
<script type="text/javascript">
var MJS_URLArry=URLArry;
var AD_list={
	api:'/adminapi/storefront/list',
	form_data:MJS_URLArry,
	tips:false,
}
var Ajax_Vue_Fun=function(vue_data){
	var Data_Vue=ajax_data_res(vue_data)
	vm=new Vue({
		el:'#Vue-Body',
		data:Data_Vue,
		components:{
			'vue-page':Vpage
		},methods:{
			Call_back:function(page){
				Vm_Call_back_Page(page)
			},List_Del:function(id,name){
				var AD_del={
					api:'/adminapi/storefront/del',
					form_data:{id:id},
					tips:'删除店面'+name+'成功',
					msg:'是否删除店面['+name+']？',
				}
				Vm_List_Status(AD_del)
			}
		}
	})
}
getData(AD_list,Ajax_Vue_Fun)
</script>
@endsection

@endsection

